<template>
  <div class="sort page-miH page-bgBack">
    <a-button icon="left" type="link" @click="goBack">返回</a-button>

    <div class="view">
      <router-view />
    </div>
  </div>
</template>

<script>
import { mapMutations, mapGetters } from "vuex";
export default {
  data() {
    return {
      current: 0
    };
  },
  computed: {
    ...mapGetters({ SALARY: "wages/SALARY" })
  },
  created() {
    if (this.$route.query.current) {
      this.current = Number(this.$route.query.current);
    }
  },
  methods: {
    ...mapMutations({
      resetSalaryParams: "wages/resetSalaryParams",
      setSalaryParams: "wages/setSalaryParams"
    }),
    // 返回
    goBack() {
      this.$router.push("/wages/payslip");
      this.resetSalaryParams();
    }
  }
};
</script>

<style lang="scss" scoped>
.sort {
  padding: 24px;
  .content-top {
    margin-top: 24px;
    padding: 40px 162px;
    background: #fafafa;
    border-radius: 4px;
  }
  .footer {
    z-index: 99;
    position: fixed;
    background: #eee;
    bottom: 0;
    width: calc(100% - 267px);
  }
}
</style>
